add heap hint support for a few of the x509 functions#7136
add heap hint support for a few of the x509 functions#7136dgarske merged 4 commits intowolfSSL:masterfrom
Conversation
|
|
||
| /* tmp ctx for setting our cert manager */ | ||
| ctx = wolfSSL_CTX_new(cm_pick_method()); | ||
| ctx = wolfSSL_CTX_new(cm_pick_method(NULL)); |
There was a problem hiding this comment.
ah ok, str->cm is checkedfor NULL
| WOLFSSL_API WOLFSSL_X509* wolfSSL_X509_new(void); | ||
| WOLFSSL_API WOLFSSL_X509* wolfSSL_X509_new_ex(void* heap); | ||
| WOLFSSL_API WOLFSSL_X509* wolfSSL_X509_dup(WOLFSSL_X509* x); | ||
| WOLFSSL_API WOLFSSL_X509* wolfSSL_X509_dup_ex(WOLFSSL_X509* x, void* heap); |
There was a problem hiding this comment.
Do you really need wolfSSL_X509_dup_ex? Can't the wolfSSL_X509_dup just use x->heap from the previous one? If you have places where heap isn't populated then switch those to using wolfSSL_X509_new_ex.
There was a problem hiding this comment.
you're right, I had this in my other PR but was following what the customer gave me for this one
|
retest this please |
|
I'm getting: which I don' think I've changed, lets try one more time: |
|
Jenkins Retest this please |
dgarske
left a comment
There was a problem hiding this comment.
Please add a test case for wolfSSL_X509_d2i_ex or adapt an existing one. How have you confirmed all X509 nodes have the heap hint? Did you try with WOLFSSL_HEAP_TEST?
where heap doesn't require a new ex function or struct field to avoid size increase
Updated the test cases but the question of how to make sure all X509 nodes have the heap hint is why I didn't want to do a half measure on this but we can't blow up the x509small size. I've updated the functions that already have the heap hint and wouldn't require their own ex function and I guess if a customer needs those functions too we can add them but I think we need a long term solution so x509small doesn't break. Tested working with Comparing the sizes, configured with On current commit: A difference of 236 bytes |
Description
Adds heap hint support only for the functions the customer asked for
Fixes zd# 17258
Testing
Uses api and crl tests
Checklist